<!-- 03VueInstance.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
	<link rel="stylesheet" href="./css/common.css"/>
	<style>
		button {
			width: 60px;
			padding: 8px;
		}
	</style>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
	<!-- <script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script> -->
	<!-- <script src="https://cdn.bootcss.com/lodash.js/4.17.15/lodash.min.js"></script> -->
</head>
<body>
	<div id="demo">
		<base-checkbox v-model="lovingVue"></base-checkbox>
	</div>
<script>
	Vue.component('base-checkbox', {
		model: {
			prop: 'checked',
			envent: 'change'
		},
		props: {
			checked: Boolean
		},
		template: `
			<input
				type="checkbox"
				v-bind:checked="checked"
				v-on:change="$emit('change', $event.target.checked)"
			>
		`
	})
	var demo = new Vue({
		el: '#demo'
	})
</script>
</body>
</html>